package user

import (
	"context"
	"fmt"
	"gozero-demo/internal/logic/admin"
	"gozero-demo/internal/svc"
	"time"
)

func StatisticsUserCount(ctx context.Context, svcCtx *svc.ServiceContext) {
	fmt.Println("StatisticsUserCount running at:", time.Now())

	listLogic := admin.NewUserListLogic(ctx, svcCtx)
	count, err := listLogic.GetUserCount()
	if err != nil {
		fmt.Println("StatisticsUserCount error:", err)
		return
	}
	if count == 0 {
		fmt.Println("StatisticsUserCount count is 0")
		return
	}
	fmt.Println("StatisticsUserCount count:", count)
	return
}
